//
//  ModuleBtn.m
//  Project
//
//  Created by 冯东辉 on 2018/9/18.
//  Copyright © 2018年 FengDongHui. All rights reserved.
//

#import "ModuleBtn.h"

@implementation ModuleBtn


- (CGRect)imageRectForContentRect:(CGRect)contentRect{
    
    CGFloat imageW = GET_SCREEN_HEIGHT()*52/667.0f;
    CGFloat imageH = imageW;
    CGFloat imageX = (contentRect.size.width-imageW) * 0.5f;
    CGFloat imageY = (contentRect.size.height-imageH) *0.5f-10;
    
    return CGRectMake(imageX, imageY, imageW, imageH);
}

- (CGRect)titleRectForContentRect:(CGRect)contentRect {
    
    CGFloat titleW = contentRect.size.width;
    CGFloat titleH = 15;
    CGFloat titleX = 0;
    CGFloat titleY = contentRect.size.height-25;
    
    return CGRectMake(titleX, titleY, titleW, titleH);
}

@end
